<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/sys/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加地块信息</title>
<%@ include file="/WEB-INF/sys/include/css.jsp"%>
</head>
<body>
<form id="form" action="${path}/block/save.json" method="post">
<div class="form">
	<div class="title">添加地块信息</div>
	<div class="group">
		<div class="label">*地块名称:</div>
		<div class="item"><input type="text" name="blockName" id="blockName" maxlength="20" /></div>
	</div>
	<div class="group">
		<div class="label">*地块编号:</div>
		<div class="item"><input type="text" name="blockCode" id="blockCode" maxlength="20" /></div>
	</div>
	<div class="group">
		<div class="label">地块用途:</div>
		<div class="item">
			<input type="radio" id="blockType1" name="blockType" value="1" checked="checked" /><label for="blockType1" class="label">种植</label>
			<input type="radio" id="blockType2" name="blockType" value="2" /><label for="blockType2" class="label">养殖</label>
			<!-- <input type="radio" id="blockType3" name="blockType" value="3" /><label for="blockType3" class="label">加工</label> -->
		</div>
	</div>
	<div class="group">
		<div class="label">*地块面积:</div>
		<div class="item"><input type="text" name="area" id="area" maxlength="15" /></div>
		<div class="text">&nbsp;m²&nbsp;</div>
		<div class="item" id="areaTip"></div>
	</div>
	<div class="group">
		<div class="label">地块状态:</div>
		<div class="item">
			<input type="radio" id="isuse0" name="isuse" value="0" /><label for="isuse0" class="label">闲置</label>
			<input type="radio" id="isuse1" name="isuse" value="1" checked="checked" /><label for="isuse1" class="label">正常</label>
		</div>
	</div>
	<div class="group">
		<div class="label">备注:</div>
		<div class="item"><textarea id="remark" name="remark"></textarea></div>
	</div>
	<div class="buttons">
		<button class="highlight" id="submit1" type="button">确定</button>
		<button type="button" id="cancel1">取消</button>
		<input type="hidden" id="parkid" name="parkid" value="${parkid}" />
	</div>
</div>
</form>
<%@ include file="/WEB-INF/sys/include/script.jsp" %>
<script type="text/javascript">
$(function() {
	$("#form").ligerForm({inputWidth: 300});
	
	verifyForm("form", {}, function(){
		$("#form").ajaxForm(function(data){
			UiUtil.isSuccess(data, "添加地块信息成功", function(){
				UiUtil.closeForm(true);
			});
		});
	});
	
	$("#submit1").click(function(){
		UiUtil.lockButton('submit1');
		$("#form").submit();
	});

	$("#cancel1").click(function(){
		UiUtil.closeForm();
	});
	
});
</script>
</body>
</html>